package app

type CommandResponse struct {
	Id       string `json:"id"`
	Status   string `json:"status"`
	ErrorMsg string `json:"errorMsg"`
}

func NewCommandResponse(id string, status string, errorMsg string) CommandResponse {
	return CommandResponse{Id: id, Status: status, ErrorMsg: errorMsg}
}

func getOkResp(id string) CommandResponse {
	return NewCommandResponse(id, "success", "")
}

func getErrorResp(id string, err error) CommandResponse {
	return NewCommandResponse(id, "fail", err.Error())
}
